# header-only library
kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-pub/taskflow
    REF "v${VERSION}"
    SHA512 599d02f981c05cd661237eb224d3eaed73e5dd026e61ca9e078bba3a05a452c7e9d11831bcd22567359ea111c42715bf66d879f4d00ba188decfcfd4ea15e973
    HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DTF_BUILD_BENCHMARKS=OFF
        -DTF_BUILD_CUDA=OFF
        -DTF_BUILD_TESTS=OFF
        -DTF_BUILD_EXAMPLES=OFF
        -DBUILD_TESTING=OFF
        -DCMAKE_CUDA_COMPILER=OFF
)

kmpkg_cmake_install()

kmpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Taskflow)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")

# Handle copyright
kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
